<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 
      
<ui:composition>
<div class="row-fluid" style="background: #FFFFFF;">
	<div class="span1"></div>
	<div class="span10">
		<h:form prependId="false" id="formConsulta">
		<p:growl id="growl" showDetail="true" sticky="true" life="6000"/>
			<h3>Consulta de Cliente</h3>
			<br />
			
			<h:outputText for="id" value="Pesquisa por Cod: " />
			<h:inputText id="id" value="#{conClienteBean.cliente.cod}" style="width:50px;" />
			<br />
			<h:outputText for="nome" value="Pesquisa por Nome: " />
			<h:inputText id="nome" value="#{conClienteBean.cliente.nome}" />
			<br />
			<p:commandButton id="btConsulta" value="Consultar" actionListener="#{conClienteBean.consultarCliente()}" update=":formCliente, :formConsulta" ajax="false"/>
		</h:form>
		<h:form prependId="false" id="formCliente">

			<p:dataTable value="#{conClienteBean.listCliente}" var="list">
				<p:column>
					<f:facet name="header">
						<h:outputText value="Cod" />
					</f:facet>
					<h:outputText value="#{list.cod}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Nome" />
					</f:facet>
					<h:outputText value="#{list.nome}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Telefone" />
					</f:facet>
					<h:outputText value="#{list.telefone}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Email" />
					</f:facet>
					<h:outputText value="#{list.email}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Rua" />
					</f:facet>
					<h:outputText value="#{list.rua}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Cod: Carteira" />
					</f:facet>
					<h:outputText value="#{list.codCarteira}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Função" />
					</f:facet>
					<h:outputText value="#{list.funcao}" />
				</p:column>
			</p:dataTable>
		</h:form>
	</div>
	<div class="span1"></div>
</div>
</ui:composition>
</html>